home *** CD-ROM | disk | FTP | other *** search
/ The Original Shareware 1.1 / The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso / 6 / coreaids.zip / CURS_GET.ASM < prev    next >
Assembly Source File  |  1987-06-25  |  938b  |  38 lines

  1. ;    DESC:    Gets Cursor Position                                 V1.00
  2. ;    IN:    *{PAGE_NUM} page number (0-7) in 40 character mode
  3. ;         or (0-3) in 80 character mode (i.e. 0003) is page 4
  4. ;    OUT:    *{ROWCOL} row (0-24),col (0-79)  (i.e. 0104)
  5. ;         1st row, 5th column
  6. ;        *{CURS_MODE} cursor mode (see manual for description)
  7. ;    SAMPLE:    Callm    CURS_GET,<PAGE_NUM>,<ROWCOL,CURS_MODE>
  8. ;    ##################################################################
  9.  
  10.     Extrn    PUSHALL:Near
  11.     Extrn    POPALL:Near
  12.  
  13. CURS_GEC    Segment
  14.     Assume    CS:CURS_GEC
  15.     Public    CURS_GET
  16.  
  17.                         ;notice.
  18.     DB    'CURS_GET  - V1.00, Copyright 1987, CoreTechs  ',0DH,0AH
  19.  
  20. CURS_GET    Proc    Near
  21.     Call    PUSHALL                ;save registers.
  22.  
  23.     Pop    BX                ;recover page nuumber.
  24.     Xchg    BH,BL                ;put page number in BH.
  25.  
  26.     Mov    AH,3                ;determine cursor location.
  27.     Int    10H
  28.  
  29.     Push    CX                ;save report.
  30.     Push    DX
  31.  
  32.     Call    POPALL                ;recover registers.
  33.     Ret
  34.  
  35. CURS_GET    Endp
  36. CURS_GEC    Ends
  37.     End
  38.